public class Dog extends Animal implements IRun,ISwim{     //单继承,多接口
    public Dog(String name) {//构造方法
        super(name);
    }

    @Override
    public void eat() {
        System.out.println(this.name+"正在用嘴吃狗粮");
    }

    @Override
    public void run() {
        System.out.println(this.name+"正在用四条腿跑!");
    }
    @Override
    public void swim() {
        System.out.println(this.name+"正在狗刨!");
    }

}
